﻿<%@ Page Language="C#" MasterPageFile="~masterurl/custom.master" AutoEventWireup="true"
  Inherits="Kiiro.SiteDefinition.ProjectPages.DocumentHistory, Kiiro.SiteDefinition, Version=1.2.0.7, Culture=neutral, PublicKeyToken=5b2f4277f61b7816" %>

<%@ Register TagPrefix="v2" TagName="AttachmentControl" Src="~/_controltemplates/Kiiro/AttachmentControl.ascx" %>
<%@ Register TagPrefix="v2" TagName="Pager" Src="~/_controltemplates/Kiiro/Pager.ascx" %>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
  <asp:Literal ID="litTitle" runat="server" />
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

  <script type="text/javascript">
      $(InitAttachments);
  </script>

  <div class="actionbar">
    <div class="wrap-has-tabs">
      <p class="left">
        <asp:HyperLink ID="hlBack" runat="server" CssClass="icon-back" Text="Back To Documents" /></p>
      <ul class="right">
        <asp:LinkButton ID="lbDelete" runat="server" CssClass="borderless" OnClick="lbDelete_Click"
          OnClientClick="" Text="Delete All Versions" />
      </ul>
    </div>
  </div>
  <div class="focus">
    <div class="wrap">
      <div class="document-history">
        <h2>
          <asp:Label ID="lblFileName" runat="server" /></h2>
      </div>
    </div>
  </div>
  <div class="body-pad">
    <div class="body">
      <div class="wrap">
        <div class="panel-pad">
          <div class="panel">
            <div class="panel-wrap">
              <div class="panel-title">
                <table class="table-document-history">
                  <tr>
                    <th class="version">
                      Version
                    </th>
                    <th class="date">
                      Date Modified
                    </th>
                    <th class="user">
                      Modified By
                    </th>
                    <th class="size">
                      File Size
                    </th>
                    <th class="revert">
                    </th>
                  </tr>
                </table>
              </div>
              <div class="panel-content has-pages">
                <div class="table">
                  <div class="table-document-history">
                    <asp:GridView ID="gvHistory" runat="server" AutoGenerateColumns="false" GridLines="None"
                      CssClass="table-document-history" ShowHeader="false" OnRowDataBound="gvHistory_RowDataBound">
                      <Columns>
                        <asp:TemplateField ItemStyle-CssClass="version" HeaderStyle-CssClass="version">
                          <ItemTemplate>
                            <asp:Label ID="lblVersion" runat="server" Text='<%# Eval("VersionLabel") %>' />
                          </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="date" HeaderStyle-CssClass="date">
                          <ItemTemplate>
                            <asp:Literal ID="docLink" runat="server" />
                          </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="user" HeaderStyle-CssClass="user">
                          <ItemTemplate>
                            <asp:Literal ID="updatedLink" runat="server" />
                          </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="size" HeaderStyle-CssClass="size">
                          <ItemTemplate>
                            <asp:Label ID="lblSize" runat="server" />
                          </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="revert" HeaderStyle-CssClass="revert">
                          <ItemTemplate>
                            <asp:LinkButton ID="lbRevert" runat="server" OnClick="lbRevert_Click" Text="Revert"
                              CommandArgument='<%# Eval("VersionLabel") %>' OnClientClick="return confirm('Are you sure you want to restore this version?');" />
                          </ItemTemplate>
                        </asp:TemplateField>
                      </Columns>
                    </asp:GridView>
                  </div>
                </div>
              </div>
            </div>
            <v2:Pager id="v2Pager" runat="server" />
          </div>
        </div>
      </div>
    </div>
  </div>
</asp:Content>
